﻿using System;


namespace advadev.CanOpen
{

    /// <summary>
    /// Represents a value changing event argument
    /// </summary>
    public class ValueChangingEventArgs
    {

        /// <summary>
        /// Initializes a new instance of the ValueChangingEventArgs class by
        /// the given parameter
        /// </summary>
        /// <param name="currentValue">
        /// Current value
        /// </param>
        /// <param name="newValue">
        /// New value
        /// </param>
        public ValueChangingEventArgs(object currentValue, object newValue)
        {
            CurrentValue = currentValue;
            NewValue = newValue;
        }


        /// <summary>
        /// Gets the current value
        /// </summary>
        public object CurrentValue
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets the new value
        /// </summary>
        public object NewValue
        {
            get;
            private set;
        }

        /// <summary>
        /// Gets or sets the abort code
        /// </summary>
        public CanOpenAbortCode AbortCode
        {
            get;
            set;
        }

    }

}
